@using System.Web.Http
@using System.Web.Http.Description
@using System.Collections.ObjectModel
@using Roadkill.Core.Areas.HelpPage.Models
@model Collection<ApiDescription>

@{
    ViewBag.Title = "Roadkill REST API Help";

    // Group APIs by controller
	ILookup<string, ApiDescription> apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor.ControllerName);
}

<header>
    <div class="content-wrapper jumbotron">
        <div class="float-left">
            <h1>@ViewBag.Title</h1>
			<p>
                The Roadkill web api provides RESTful apis for getting and retrieving data from your Roadkill instance,
				and provide the data in XML and JSON format.
            </p>
			<p>
				The API currently requires an admin login (via user/Authenticate) to make requests.
			</p>
        </div>
    </div>
</header>
<div id="body">
    <section class="content-wrapper main-content clear-fix">
        @foreach (var group in apiGroups)
        {
            @Html.DisplayFor(m => group, "ApiGroup")
        }
    </section>
</div>